home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-22 | 2.6 KB | 74 lines | [TEXT/GEOL] |
- Item forwarded by SHEBANOW1 to CHEWBACCA
-
- Item 1781690 29-July-89 21:41
-
- From: D2086 Efficient Field Svc, C Faith, PRT
-
- To: MACDTS Macintosh Developer Technical Supt.
- MACAPP.TEST MacApp SQA Team
- MACAPP.TECH$ MACAPP Tech
-
- Sub: Nasty B9 Bug Squashed!
-
- Hello,
-
- I'm back with good news. I just traced the problem I am having with
- InitUObject even further down to a single instruction in GetClassNamesFromID,
- and have since figured out exactly how the bug manifests itself as well as a
- reasonable workaround.
-
- The stack frames get messed up just after the move statement below:
-
- GETCLASSNAMEFROMID
- +00A0 002053D4 1694 •*MOVE.B (A4),(A3)
-
- This line corresponds exactly with the pascal statement:
- clNamePtr^ := namePtr^;
-
- Here is the stack frame before this statement:
- Frame Addr Frame Owner Called From
- <main> MYAPP
- $0027BDD6 INITUMACAPP MYAPP.(1)+$0004
- $0027BDBA INITUOBJECT INITUMACAPP.(10)
- $0027BDB2 ORDERCLASSIDSBYNAME INITUOBJECT.(8)
- $0027BCFE GETCLASSNAMEFROMID ORDERCLASSIDSBYNAME.(12)+$0006
-
- Here I executed an assembly level step and stack command in SADE. I get the
- following stack frame display.
-
- Frame Addr Frame Owner Called From
- <main> INITUOBJECT
- $0027BDB2 ORDERCLASSIDSBYNAME INITUOBJECT.(8)
- $0027BCFE GETCLASSNAMEFROMID ORDERCLASSIDSBYNAME.(12)+$0006
-
- GETCLASSNAMEFROMID
- +00A2 002053D6 528B *ADDQ.L #$1,A3
-
- Now this code is doing exactly what it should ( at least it looks good to me),
- so I tried to determine why this would screw up the stack. Well this statement
- only screws up the stack after the 72nd execution of the loop so I looked up
- the size of the MAName Type and sure enough it is only 63 for 64 bytes of
- storage, hence the routine is copying past the end of the space it should.
-
- GetClassNameFromId bombs for any names of length greater than 63. I am not
- sure what the implications of changing the size of MAName are so for now I
- shortened up the names of all my methods and classes and everything works fine.
-
- What do the names consist of anyway? My method and class names were long but
- maybe 15 to 25 maximum characters not 75.
-
- Anyway If you get bombs just after your app starts up try shortening up your
- method and class names.
-
- I would appreciate it if the MacApp team would comment on the best way to fix
- this so that I can use reasonably long identifiers, and so I will be compatible
- with the official fix.
-
- regards,
-
- Curtis Faith
-
-
-
-
-